import http from '@/http'
import { IUploadImgParm, IPublishParm } from './AddstartModel'

// 上传图片
export const uploadImgApi = (data: IUploadImgParm) => {
  return http.upload('/api/upload/image', data)
}

// 发布团购
export const publishApi = (data: IPublishParm) => {
  return http.post('/api/groupbuy-operate/create', data)
}

// 获取规格类型数据列表
export const getSpecListApi = () => {
  return http.get('/api/goods/goods-spec/query')
}

// 新增规格类型
export const addSpecApi = (data: any) => {
  return http.post('/api/goods/goods-spec/save', data)
}

// 删除规格类型
export const deleteSpecApi = (data: any) => {
  return http.post('/api/goods/goods-spec/delete', data)
}

// 修改规格类型
export const modifySpecApi = (data: any) => {
  return http.post('/api/goods/goods-spec/modify', data)
}
//获取OSStoken
export const getOSTokenApi = () => {
  return http.get('/api/upload/getToken')  
}